3.2.51 \(\int (c+d x)^3 (a+b \sin (e+f x)) \, dx\) [151]

Optimal. Leaf size=90 \[ \frac {a (c+d x)^4}{4 d}+\frac {6 b d^2 (c+d x) \cos (e+f x)}{f^3}-\frac {b (c+d x)^3 \cos (e+f x)}{f}-\frac {6 b d^3 \sin (e+f x)}{f^4}+\frac {3 b d (c+d x)^2 \sin (e+f x)}{f^2} \]

[Out]

1/4*a*(d*x+c)^4/d+6*b*d^2*(d*x+c)*cos(f*x+e)/f^3-b*(d*x+c)^3*cos(f*x+e)/f-6*b*d^3*sin(f*x+e)/f^4+3*b*d*(d*x+c)
^2*sin(f*x+e)/f^2

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3398, 3377, 2717} \begin {gather*} \frac {a (c+d x)^4}{4 d}+\frac {6 b d^2 (c+d x) \cos (e+f x)}{f^3}+\frac {3 b d (c+d x)^2 \sin (e+f x)}{f^2}-\frac {b (c+d x)^3 \cos (e+f x)}{f}-\frac {6 b d^3 \sin (e+f x)}{f^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)^3*(a + b*Sin[e + f*x]),x]

[Out]

(a*(c + d*x)^4)/(4*d) + (6*b*d^2*(c + d*x)*Cos[e + f*x])/f^3 - (b*(c + d*x)^3*Cos[e + f*x])/f - (6*b*d^3*Sin[e
 + f*x])/f^4 + (3*b*d*(c + d*x)^2*Sin[e + f*x])/f^2

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3398

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rubi steps

\begin {align*} \int (c+d x)^3 (a+b \sin (e+f x)) \, dx &=\int \left (a (c+d x)^3+b (c+d x)^3 \sin (e+f x)\right ) \, dx\\ &=\frac {a (c+d x)^4}{4 d}+b \int (c+d x)^3 \sin (e+f x) \, dx\\ &=\frac {a (c+d x)^4}{4 d}-\frac {b (c+d x)^3 \cos (e+f x)}{f}+\frac {(3 b d) \int (c+d x)^2 \cos (e+f x) \, dx}{f}\\ &=\frac {a (c+d x)^4}{4 d}-\frac {b (c+d x)^3 \cos (e+f x)}{f}+\frac {3 b d (c+d x)^2 \sin (e+f x)}{f^2}-\frac {\left (6 b d^2\right ) \int (c+d x) \sin (e+f x) \, dx}{f^2}\\ &=\frac {a (c+d x)^4}{4 d}+\frac {6 b d^2 (c+d x) \cos (e+f x)}{f^3}-\frac {b (c+d x)^3 \cos (e+f x)}{f}+\frac {3 b d (c+d x)^2 \sin (e+f x)}{f^2}-\frac {\left (6 b d^3\right ) \int \cos (e+f x) \, dx}{f^3}\\ &=\frac {a (c+d x)^4}{4 d}+\frac {6 b d^2 (c+d x) \cos (e+f x)}{f^3}-\frac {b (c+d x)^3 \cos (e+f x)}{f}-\frac {6 b d^3 \sin (e+f x)}{f^4}+\frac {3 b d (c+d x)^2 \sin (e+f x)}{f^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.24, size = 124, normalized size = 1.38 \begin {gather*} \frac {1}{4} a x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right )-\frac {b (c+d x) \left (c^2 f^2+2 c d f^2 x+d^2 \left (-6+f^2 x^2\right )\right ) \cos (e+f x)}{f^3}+\frac {3 b d \left (c^2 f^2+2 c d f^2 x+d^2 \left (-2+f^2 x^2\right )\right ) \sin (e+f x)}{f^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)^3*(a + b*Sin[e + f*x]),x]

[Out]

(a*x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x^3))/4 - (b*(c + d*x)*(c^2*f^2 + 2*c*d*f^2*x + d^2*(-6 + f^2*x^2)
)*Cos[e + f*x])/f^3 + (3*b*d*(c^2*f^2 + 2*c*d*f^2*x + d^2*(-2 + f^2*x^2))*Sin[e + f*x])/f^4

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(481\) vs. \(2(88)=176\).
time = 0.06, size = 482, normalized size = 5.36

method result size
risch \(\frac {a \,d^{3} x^{4}}{4}+a \,d^{2} c \,x^{3}+\frac {3 a d \,c^{2} x^{2}}{2}+a \,c^{3} x +\frac {a \,c^{4}}{4 d}-\frac {b \left (d^{3} f^{2} x^{3}+3 c \,d^{2} f^{2} x^{2}+3 c^{2} d \,f^{2} x +c^{3} f^{2}-6 d^{3} x -6 c \,d^{2}\right ) \cos \left (f x +e \right )}{f^{3}}+\frac {3 b d \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}-2 d^{2}\right ) \sin \left (f x +e \right )}{f^{4}}\) \(153\)
norman \(\frac {\frac {\left (a \,c^{3} f^{3}-3 b \,c^{2} d \,f^{2}+6 b \,d^{3}\right ) x}{f^{3}}+\frac {\left (2 b \,c^{3} f^{2}-12 c \,d^{2} b \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f^{3}}+\frac {d^{2} \left (a c f -b d \right ) x^{3}}{f}+\frac {\left (a \,c^{3} f^{3}+3 b \,c^{2} d \,f^{2}-6 b \,d^{3}\right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f^{3}}+\frac {d^{2} \left (a c f +b d \right ) x^{3} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {a \,d^{3} x^{4}}{4}+\frac {a \,d^{3} x^{4} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4}+\frac {6 b d \left (c^{2} f^{2}-2 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f^{4}}+\frac {6 b \,d^{3} x^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f^{2}}+\frac {3 c d \left (a c f -2 b d \right ) x^{2}}{2 f}+\frac {3 c d \left (a c f +2 b d \right ) x^{2} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}+\frac {12 c \,d^{2} b x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f^{2}}}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}\) \(317\)
derivativedivides \(\frac {a \,c^{3} \left (f x +e \right )-\frac {3 a \,c^{2} d e \left (f x +e \right )}{f}+\frac {3 a \,c^{2} d \left (f x +e \right )^{2}}{2 f}+\frac {3 a c \,d^{2} e^{2} \left (f x +e \right )}{f^{2}}-\frac {3 a c \,d^{2} e \left (f x +e \right )^{2}}{f^{2}}+\frac {a c \,d^{2} \left (f x +e \right )^{3}}{f^{2}}-\frac {a \,d^{3} e^{3} \left (f x +e \right )}{f^{3}}+\frac {3 a \,d^{3} e^{2} \left (f x +e \right )^{2}}{2 f^{3}}-\frac {a \,d^{3} e \left (f x +e \right )^{3}}{f^{3}}+\frac {a \,d^{3} \left (f x +e \right )^{4}}{4 f^{3}}-b \,c^{3} \cos \left (f x +e \right )+\frac {3 b \,c^{2} d e \cos \left (f x +e \right )}{f}+\frac {3 b \,c^{2} d \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f}-\frac {3 b c \,d^{2} e^{2} \cos \left (f x +e \right )}{f^{2}}-\frac {6 b c \,d^{2} e \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{2}}+\frac {3 b c \,d^{2} \left (-\left (f x +e \right )^{2} \cos \left (f x +e \right )+2 \cos \left (f x +e \right )+2 \left (f x +e \right ) \sin \left (f x +e \right )\right )}{f^{2}}+\frac {b \,d^{3} e^{3} \cos \left (f x +e \right )}{f^{3}}+\frac {3 b \,d^{3} e^{2} \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{3}}-\frac {3 b \,d^{3} e \left (-\left (f x +e \right )^{2} \cos \left (f x +e \right )+2 \cos \left (f x +e \right )+2 \left (f x +e \right ) \sin \left (f x +e \right )\right )}{f^{3}}+\frac {b \,d^{3} \left (-\left (f x +e \right )^{3} \cos \left (f x +e \right )+3 \left (f x +e \right )^{2} \sin \left (f x +e \right )-6 \sin \left (f x +e \right )+6 \left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{3}}}{f}\) \(482\)
default \(\frac {a \,c^{3} \left (f x +e \right )-\frac {3 a \,c^{2} d e \left (f x +e \right )}{f}+\frac {3 a \,c^{2} d \left (f x +e \right )^{2}}{2 f}+\frac {3 a c \,d^{2} e^{2} \left (f x +e \right )}{f^{2}}-\frac {3 a c \,d^{2} e \left (f x +e \right )^{2}}{f^{2}}+\frac {a c \,d^{2} \left (f x +e \right )^{3}}{f^{2}}-\frac {a \,d^{3} e^{3} \left (f x +e \right )}{f^{3}}+\frac {3 a \,d^{3} e^{2} \left (f x +e \right )^{2}}{2 f^{3}}-\frac {a \,d^{3} e \left (f x +e \right )^{3}}{f^{3}}+\frac {a \,d^{3} \left (f x +e \right )^{4}}{4 f^{3}}-b \,c^{3} \cos \left (f x +e \right )+\frac {3 b \,c^{2} d e \cos \left (f x +e \right )}{f}+\frac {3 b \,c^{2} d \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f}-\frac {3 b c \,d^{2} e^{2} \cos \left (f x +e \right )}{f^{2}}-\frac {6 b c \,d^{2} e \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{2}}+\frac {3 b c \,d^{2} \left (-\left (f x +e \right )^{2} \cos \left (f x +e \right )+2 \cos \left (f x +e \right )+2 \left (f x +e \right ) \sin \left (f x +e \right )\right )}{f^{2}}+\frac {b \,d^{3} e^{3} \cos \left (f x +e \right )}{f^{3}}+\frac {3 b \,d^{3} e^{2} \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{3}}-\frac {3 b \,d^{3} e \left (-\left (f x +e \right )^{2} \cos \left (f x +e \right )+2 \cos \left (f x +e \right )+2 \left (f x +e \right ) \sin \left (f x +e \right )\right )}{f^{3}}+\frac {b \,d^{3} \left (-\left (f x +e \right )^{3} \cos \left (f x +e \right )+3 \left (f x +e \right )^{2} \sin \left (f x +e \right )-6 \sin \left (f x +e \right )+6 \left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{3}}}{f}\) \(482\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)^3*(a+b*sin(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

1/f*(a*c^3*(f*x+e)-3/f*a*c^2*d*e*(f*x+e)+3/2/f*a*c^2*d*(f*x+e)^2+3/f^2*a*c*d^2*e^2*(f*x+e)-3/f^2*a*c*d^2*e*(f*
x+e)^2+1/f^2*a*c*d^2*(f*x+e)^3-1/f^3*a*d^3*e^3*(f*x+e)+3/2/f^3*a*d^3*e^2*(f*x+e)^2-1/f^3*a*d^3*e*(f*x+e)^3+1/4
/f^3*a*d^3*(f*x+e)^4-b*c^3*cos(f*x+e)+3/f*b*c^2*d*e*cos(f*x+e)+3/f*b*c^2*d*(sin(f*x+e)-(f*x+e)*cos(f*x+e))-3/f
^2*b*c*d^2*e^2*cos(f*x+e)-6/f^2*b*c*d^2*e*(sin(f*x+e)-(f*x+e)*cos(f*x+e))+3/f^2*b*c*d^2*(-(f*x+e)^2*cos(f*x+e)
+2*cos(f*x+e)+2*(f*x+e)*sin(f*x+e))+1/f^3*b*d^3*e^3*cos(f*x+e)+3/f^3*b*d^3*e^2*(sin(f*x+e)-(f*x+e)*cos(f*x+e))
-3/f^3*b*d^3*e*(-(f*x+e)^2*cos(f*x+e)+2*cos(f*x+e)+2*(f*x+e)*sin(f*x+e))+1/f^3*b*d^3*(-(f*x+e)^3*cos(f*x+e)+3*
(f*x+e)^2*sin(f*x+e)-6*sin(f*x+e)+6*(f*x+e)*cos(f*x+e)))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 498 vs. \(2 (92) = 184\).
time = 0.30, size = 498, normalized size = 5.53 \begin {gather*} \frac {4 \, {\left (f x + e\right )} a c^{3} + \frac {{\left (f x + e\right )}^{4} a d^{3}}{f^{3}} + \frac {4 \, {\left (f x + e\right )}^{3} a c d^{2}}{f^{2}} + \frac {6 \, {\left (f x + e\right )}^{2} a c^{2} d}{f} - 4 \, b c^{3} \cos \left (f x + e\right ) - \frac {4 \, {\left (f x + e\right )}^{3} a d^{3} e}{f^{3}} - \frac {12 \, {\left (f x + e\right )}^{2} a c d^{2} e}{f^{2}} - \frac {12 \, {\left (f x + e\right )} a c^{2} d e}{f} + \frac {12 \, b c^{2} d \cos \left (f x + e\right ) e}{f} - \frac {12 \, {\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} b c^{2} d}{f} + \frac {6 \, {\left (f x + e\right )}^{2} a d^{3} e^{2}}{f^{3}} + \frac {12 \, {\left (f x + e\right )} a c d^{2} e^{2}}{f^{2}} - \frac {12 \, b c d^{2} \cos \left (f x + e\right ) e^{2}}{f^{2}} + \frac {24 \, {\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} b c d^{2} e}{f^{2}} - \frac {12 \, {\left ({\left ({\left (f x + e\right )}^{2} - 2\right )} \cos \left (f x + e\right ) - 2 \, {\left (f x + e\right )} \sin \left (f x + e\right )\right )} b c d^{2}}{f^{2}} - \frac {4 \, {\left (f x + e\right )} a d^{3} e^{3}}{f^{3}} + \frac {4 \, b d^{3} \cos \left (f x + e\right ) e^{3}}{f^{3}} - \frac {12 \, {\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} b d^{3} e^{2}}{f^{3}} + \frac {12 \, {\left ({\left ({\left (f x + e\right )}^{2} - 2\right )} \cos \left (f x + e\right ) - 2 \, {\left (f x + e\right )} \sin \left (f x + e\right )\right )} b d^{3} e}{f^{3}} - \frac {4 \, {\left ({\left ({\left (f x + e\right )}^{3} - 6 \, f x - 6 \, e\right )} \cos \left (f x + e\right ) - 3 \, {\left ({\left (f x + e\right )}^{2} - 2\right )} \sin \left (f x + e\right )\right )} b d^{3}}{f^{3}}}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3*(a+b*sin(f*x+e)),x, algorithm="maxima")

[Out]

1/4*(4*(f*x + e)*a*c^3 + (f*x + e)^4*a*d^3/f^3 + 4*(f*x + e)^3*a*c*d^2/f^2 + 6*(f*x + e)^2*a*c^2*d/f - 4*b*c^3
*cos(f*x + e) - 4*(f*x + e)^3*a*d^3*e/f^3 - 12*(f*x + e)^2*a*c*d^2*e/f^2 - 12*(f*x + e)*a*c^2*d*e/f + 12*b*c^2
*d*cos(f*x + e)*e/f - 12*((f*x + e)*cos(f*x + e) - sin(f*x + e))*b*c^2*d/f + 6*(f*x + e)^2*a*d^3*e^2/f^3 + 12*
(f*x + e)*a*c*d^2*e^2/f^2 - 12*b*c*d^2*cos(f*x + e)*e^2/f^2 + 24*((f*x + e)*cos(f*x + e) - sin(f*x + e))*b*c*d
^2*e/f^2 - 12*(((f*x + e)^2 - 2)*cos(f*x + e) - 2*(f*x + e)*sin(f*x + e))*b*c*d^2/f^2 - 4*(f*x + e)*a*d^3*e^3/
f^3 + 4*b*d^3*cos(f*x + e)*e^3/f^3 - 12*((f*x + e)*cos(f*x + e) - sin(f*x + e))*b*d^3*e^2/f^3 + 12*(((f*x + e)
^2 - 2)*cos(f*x + e) - 2*(f*x + e)*sin(f*x + e))*b*d^3*e/f^3 - 4*(((f*x + e)^3 - 6*f*x - 6*e)*cos(f*x + e) - 3
*((f*x + e)^2 - 2)*sin(f*x + e))*b*d^3/f^3)/f

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 170, normalized size = 1.89 \begin {gather*} \frac {a d^{3} f^{4} x^{4} + 4 \, a c d^{2} f^{4} x^{3} + 6 \, a c^{2} d f^{4} x^{2} + 4 \, a c^{3} f^{4} x - 4 \, {\left (b d^{3} f^{3} x^{3} + 3 \, b c d^{2} f^{3} x^{2} + b c^{3} f^{3} - 6 \, b c d^{2} f + 3 \, {\left (b c^{2} d f^{3} - 2 \, b d^{3} f\right )} x\right )} \cos \left (f x + e\right ) + 12 \, {\left (b d^{3} f^{2} x^{2} + 2 \, b c d^{2} f^{2} x + b c^{2} d f^{2} - 2 \, b d^{3}\right )} \sin \left (f x + e\right )}{4 \, f^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3*(a+b*sin(f*x+e)),x, algorithm="fricas")

[Out]

1/4*(a*d^3*f^4*x^4 + 4*a*c*d^2*f^4*x^3 + 6*a*c^2*d*f^4*x^2 + 4*a*c^3*f^4*x - 4*(b*d^3*f^3*x^3 + 3*b*c*d^2*f^3*
x^2 + b*c^3*f^3 - 6*b*c*d^2*f + 3*(b*c^2*d*f^3 - 2*b*d^3*f)*x)*cos(f*x + e) + 12*(b*d^3*f^2*x^2 + 2*b*c*d^2*f^
2*x + b*c^2*d*f^2 - 2*b*d^3)*sin(f*x + e))/f^4

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 264 vs. \(2 (88) = 176\).
time = 0.25, size = 264, normalized size = 2.93 \begin {gather*} \begin {cases} a c^{3} x + \frac {3 a c^{2} d x^{2}}{2} + a c d^{2} x^{3} + \frac {a d^{3} x^{4}}{4} - \frac {b c^{3} \cos {\left (e + f x \right )}}{f} - \frac {3 b c^{2} d x \cos {\left (e + f x \right )}}{f} + \frac {3 b c^{2} d \sin {\left (e + f x \right )}}{f^{2}} - \frac {3 b c d^{2} x^{2} \cos {\left (e + f x \right )}}{f} + \frac {6 b c d^{2} x \sin {\left (e + f x \right )}}{f^{2}} + \frac {6 b c d^{2} \cos {\left (e + f x \right )}}{f^{3}} - \frac {b d^{3} x^{3} \cos {\left (e + f x \right )}}{f} + \frac {3 b d^{3} x^{2} \sin {\left (e + f x \right )}}{f^{2}} + \frac {6 b d^{3} x \cos {\left (e + f x \right )}}{f^{3}} - \frac {6 b d^{3} \sin {\left (e + f x \right )}}{f^{4}} & \text {for}\: f \neq 0 \\\left (a + b \sin {\left (e \right )}\right ) \left (c^{3} x + \frac {3 c^{2} d x^{2}}{2} + c d^{2} x^{3} + \frac {d^{3} x^{4}}{4}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)**3*(a+b*sin(f*x+e)),x)

[Out]

Piecewise((a*c**3*x + 3*a*c**2*d*x**2/2 + a*c*d**2*x**3 + a*d**3*x**4/4 - b*c**3*cos(e + f*x)/f - 3*b*c**2*d*x
*cos(e + f*x)/f + 3*b*c**2*d*sin(e + f*x)/f**2 - 3*b*c*d**2*x**2*cos(e + f*x)/f + 6*b*c*d**2*x*sin(e + f*x)/f*
*2 + 6*b*c*d**2*cos(e + f*x)/f**3 - b*d**3*x**3*cos(e + f*x)/f + 3*b*d**3*x**2*sin(e + f*x)/f**2 + 6*b*d**3*x*
cos(e + f*x)/f**3 - 6*b*d**3*sin(e + f*x)/f**4, Ne(f, 0)), ((a + b*sin(e))*(c**3*x + 3*c**2*d*x**2/2 + c*d**2*
x**3 + d**3*x**4/4), True))

________________________________________________________________________________________

Giac [A]
time = 5.80, size = 157, normalized size = 1.74 \begin {gather*} \frac {1}{4} \, a d^{3} x^{4} + a c d^{2} x^{3} + \frac {3}{2} \, a c^{2} d x^{2} + a c^{3} x - \frac {{\left (b d^{3} f^{3} x^{3} + 3 \, b c d^{2} f^{3} x^{2} + 3 \, b c^{2} d f^{3} x + b c^{3} f^{3} - 6 \, b d^{3} f x - 6 \, b c d^{2} f\right )} \cos \left (f x + e\right )}{f^{4}} + \frac {3 \, {\left (b d^{3} f^{2} x^{2} + 2 \, b c d^{2} f^{2} x + b c^{2} d f^{2} - 2 \, b d^{3}\right )} \sin \left (f x + e\right )}{f^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^3*(a+b*sin(f*x+e)),x, algorithm="giac")

[Out]

1/4*a*d^3*x^4 + a*c*d^2*x^3 + 3/2*a*c^2*d*x^2 + a*c^3*x - (b*d^3*f^3*x^3 + 3*b*c*d^2*f^3*x^2 + 3*b*c^2*d*f^3*x
 + b*c^3*f^3 - 6*b*d^3*f*x - 6*b*c*d^2*f)*cos(f*x + e)/f^4 + 3*(b*d^3*f^2*x^2 + 2*b*c*d^2*f^2*x + b*c^2*d*f^2
- 2*b*d^3)*sin(f*x + e)/f^4

________________________________________________________________________________________

Mupad [B]
time = 0.80, size = 191, normalized size = 2.12 \begin {gather*} \frac {a\,d^3\,x^4}{4}-\frac {3\,\sin \left (e+f\,x\right )\,\left (2\,b\,d^3-b\,c^2\,d\,f^2\right )}{f^4}-\frac {\cos \left (e+f\,x\right )\,\left (b\,c^3\,f^2-6\,b\,c\,d^2\right )}{f^3}+a\,c^3\,x+\frac {3\,x\,\cos \left (e+f\,x\right )\,\left (2\,b\,d^3-b\,c^2\,d\,f^2\right )}{f^3}+\frac {3\,a\,c^2\,d\,x^2}{2}+a\,c\,d^2\,x^3-\frac {b\,d^3\,x^3\,\cos \left (e+f\,x\right )}{f}+\frac {3\,b\,d^3\,x^2\,\sin \left (e+f\,x\right )}{f^2}+\frac {6\,b\,c\,d^2\,x\,\sin \left (e+f\,x\right )}{f^2}-\frac {3\,b\,c\,d^2\,x^2\,\cos \left (e+f\,x\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(e + f*x))*(c + d*x)^3,x)

[Out]

(a*d^3*x^4)/4 - (3*sin(e + f*x)*(2*b*d^3 - b*c^2*d*f^2))/f^4 - (cos(e + f*x)*(b*c^3*f^2 - 6*b*c*d^2))/f^3 + a*
c^3*x + (3*x*cos(e + f*x)*(2*b*d^3 - b*c^2*d*f^2))/f^3 + (3*a*c^2*d*x^2)/2 + a*c*d^2*x^3 - (b*d^3*x^3*cos(e +
f*x))/f + (3*b*d^3*x^2*sin(e + f*x))/f^2 + (6*b*c*d^2*x*sin(e + f*x))/f^2 - (3*b*c*d^2*x^2*cos(e + f*x))/f

________________________________________________________________________________________